package com.ruoyi.admin.domain.vo.request.category;

import com.ruoyi.admin.domain.entity.CategoryModel;
import com.ruoyi.common.page.PageParamRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.BeanUtils;


/**
 * 分页返回数据格式
 *
 * @author jianhan
 * @date 2022-12-07 15:41:37
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class CategoryPageRequest extends PageParamRequest {


    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "品类")
    private String category;


    /**
     * 获取实体对象
     *
     * @return 对象
     * @author jianhan
     * @date 2022-12-07 15:41:37
     **/
    @ApiModelProperty(hidden = true)
    public CategoryModel getCategoryModel() {
        CategoryModel categoryModel = new CategoryModel();
        BeanUtils.copyProperties(this, categoryModel);
        return categoryModel;
    }

}
